package Com.amit.corejava;


public class Lab87  implements Cloneable{

	int id;
	String name;
	
	public Lab87(int id, String name) {
		super();
		this.id = id;
		this.name = name;
	}
	
@Override
protected Object clone() throws CloneNotSupportedException {

	return super.clone();
}

	public static void main(String[] args) throws CloneNotSupportedException {
		
		Lab87 l1=new Lab87(1,"amit yadav");
		Lab87 l2=(Lab87) l1.clone();
		
		System.out.println(l1.id+" "+l1.name);
		System.out.println(l2.id+" "+l2.name);
		

	}

}
